@echo off
chcp 65001 >nul
echo ========================================
echo 修复project_basic_info表的AUTO_INCREMENT错误
echo ========================================
echo.

REM 设置数据库连接信息
set DB_HOST=106.52.158.123
set DB_PORT=3306
set DB_NAME=kaizeli
set DB_USER=kaizeli_ddl
set DB_PASS=DDL_password123!

echo 正在连接到数据库: %DB_HOST%:%DB_PORT%/%DB_NAME%
echo.

REM 执行SQL脚本
mysql -h%DB_HOST% -P%DB_PORT% -u%DB_USER% -p%DB_PASS% %DB_NAME% < fix_project_basic_info_auto_increment.sql

if %errorlevel% equ 0 (
    echo.
    echo ========================================
    echo 修复成功！
    echo ========================================
) else (
    echo.
    echo ========================================
    echo 修复失败！请检查错误信息
    echo ========================================
)

pause
